package cn.wolfcode.wolf2world.web.controller;

import cn.wolfcode.wolf2world.utils.LoadFileUtil;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * @author 杨兴健
 * @Date 2020/8/12 14:56
 */
@RestController
public class UploadController {

    @PostMapping("/coverImageUpload")
    public Object coverImageUpload(MultipartFile pic) throws Exception {
        //TODO 上传图片
        String url = LoadFileUtil.uploadAli(pic);
        return url;
    }

}
